package com.ruoyi.common.core.domain.vo;

import com.alibaba.fastjson2.JSON;
import lombok.Data;

import java.util.List;

@Data
public class SelectOptionVO {
    private String label;//显示文本
    private String text;//显示文本
    private Object value;//值

    private List<SelectOptionVO> children;


    public SelectOptionVO() {

    }

    public SelectOptionVO(String label, String value) {
        this.label = label;
        this.text = label;
        this.value = value;
    }

    public SelectOptionVO(String label, Object value) {
        this.label = label;
        this.text = label;
        this.value = JSON.toJSONString(value);
    }

    public SelectOptionVO(String label, Long value) {
        this.label = label;
        this.value = value;
    }
}
